package com.zhoutao.blog.seven.api;

import com.zhoutao.blog.seven.model.AdminTableResp;
import com.zhoutao.blog.seven.model.detail.BookDetail;
import com.zhoutao.blog.seven.service.BookService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/admin/api/books")
public class AdminBookController {

    @Autowired
    private BookService bookService;

    @GetMapping
    public AdminTableResp<BookDetail> articleList() {
        return AdminTableResp.success(bookService.list());
    }


}
